#include<iostream>
#include<algorithm>
using namespace std;
#include"BSTree.h"

void test()
{
	int a[] = { 8,3,1,10,6,4,7,14,13 };
	BSTree<int> tree;
	for (auto e : a) tree.insertR(e);
	tree.inorder();

	tree.erase(4);
	tree.inorder();

	tree.erase(3);
	tree.inorder();

	tree.erase(8);
	tree.inorder();

	tree.erase(10);
	tree.inorder();

	for (auto e : a) tree.erase(e);
	tree.inorder();
}

int main()
{
	test();
	
	return 0;
}